<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="u" uri="/iuie-tag"%>
<%@ taglib prefix="sys" uri="/sys-tag" %>
<%@ taglib prefix="lui" tagdir="/WEB-INF/tags" %>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>平台首页</title>
</head>
<lui:context/>
<u:View basePath="/res-datum/platform" userJS="platform" userCSS="platform" delayLoadJs="false">
<body>
<lui:boards>
    <lui:board width="100%" boardTitle="消息">
    	<form id="findMsgFrm" class='m-cust'>
    		<!-- 水平排列 -->
			<div class="form-horizontal">
				<div class="form-group m-narrow">
					<div class="col-md-3 col-sm-3">
						<div class="input-group">
							<label for="msgTitle" class="input-group-addon">标题</label>
							<input name="msgTitle" id="msgTitle" type="text" class="form-control">
						</div>
					</div>
					<div class="col-md-3 col-sm-3">
						<div class="input-group"> 
							<label for="creatorName" class="input-group-addon">发起人</label>
							<input name="creatorName" id="creatorName" type="text" class="form-control">
						</div>
					</div>
					<div class="col-md-3 col-sm-3">
						<div class="input-group"> 
							<label for="startTime" class="input-group-addon">时间</label>
							<lui:datepicker name="startTime" dateType="date" id="startTime" endDate="${u:getCurrTimeChangeNthDayDate(0,'yyyy-MM-dd HH:mm:ss') }" 
								startDate="${u:getCurrTimeChangeNthDayDate(-7,'yyyy-MM-dd HH:mm:ss') }"/>
						</div>
					</div>
					<div class="col-md-3 col-sm-3">
						<div class="input-group"> 
							<label for="endTime" class="input-group-addon">至</label>
							<lui:datepicker name="endTime" dateType="date" id="endTime" endDate="${u:getCurrTimeChangeNthDayDate(0,'yyyy-MM-dd HH:mm:ss') }" 
								startDate="${u:getCurrTimeChangeNthDayDate(-7,'yyyy-MM-dd HH:mm:ss') }"/>
						</div>
					</div>
				</div>
			</div>
			<div class="form-horizontal">
				<div class="form-group">
					<div class="col-md-12 col-sm-12">
						<div class="btn-group" id="buttonGro">
							<button type="button" class="btn btn-primary" onclick="PlatformPage.queryByCondition()"><i class='fa fa-fw fa-search'></i>查询</button>
							<button type="reset" class="btn btn-default"><i class='fa fa-fw fa-repeat'></i>重置</button>
						</div>
					</div>
				</div>
			</div>
			<u:dropListView id="dropView_oper">
                <u:dropView name="viewMsg" template="view" onClick="PlatformPage.viewMsg" title="查看"/>
            </u:dropListView>
			<u:dataSet id="msgSet" idField="userId">
				<u:dataField display="ID" name="msgId" sort="true" visiable="false"/>
				<u:dataField display="标题" name="msgTitle" align="left" width="600px"/>
				<u:dataField display="分类" name="msgCategory" align="left" width="320px"/>
				<u:dataField display="发起人" name="creatorName" width="80px" align="center"/>
				<u:dataField display="阅读次数" name="hits" width="90px" align="center"/>
				<u:dataField display="更新时间" name="updateTime" width="140px" align="center" format="yyyy-MM-dd HH:mm:ss" formatType="date"/>
				<u:dataField display="消息详情" name="msgDetail" width="180px" align="left" visiable="false" />
				<u:dataField display="超链接" name="msgLink" width="180px" align="left" visiable="false"/>
				<u:dataField display="消息来源" name="msgFrom" width="80px" align="center"/>
				<u:dataField name="oper" dropView="dropView_oper" display="操作" width="80px"/>
			</u:dataSet>
			<!-- 获取最新消息列表ajax -->
			<lui:ajax id="findLatestMsgAjax" url="${ctx }/datum/platform/find/latestMsg" formQuery="#findMsgFrm" onSuccess="PlatformPage.onFindLstSucc"/>
			<lui:datatable id="msgDatatable" ajax="findLatestMsgAjax" sortable="true" pagination="msgPagination" dataset="msgSet" checkable="true"
			    multiple="false" onDoubleClick="PlatformPage.onDoubleClick" cutLine="true"/>
			<lui:pagination datatable="msgDatatable" id="msgPagination" pageSize="15" pageChoice="15" showPageChoice="false"/>
			<lui:ajax url="${ctx }/datum/blog/signRead" id="signReadAjax" onSuccess="PlatformPage.refreshReadCount" silent="true"/>
    	</form>
    </lui:board>
</lui:boards>
</body>
</u:View>
</html>